//
//  ST_DTMaskChatCell.swift
//  btvideo
//
//  Created by mac on 2020/5/15.
//  Copyright © 2020 JarvanZhang. All rights reserved.
//

import UIKit
import SwifterSwift
import SDWebImage

class ST_DTMaskChatCell: ST_DTChatCell {
    

    static let height = (60+15*2).cgFloat
    
    private lazy var maks_image_view:UIButton = {
        
        let control = UIButton.init(type: UIButton.ButtonType.custom)
        control.add_touch_up(insideTarget: self, action: #selector(display_full_image))
//        control.backgroundColor = Color.random
//        control.imageView?.contentMode = .scaleAspectFill
        control.setImageForAllStates(ST_ImageUtils.imageName("聊天Mask")!)
        return control
    }()
    
    @objc func display_full_image(){
       
    }

    
    override func commonInit(){
        
        super.commonInit()
        
        icon.snp.makeConstraints { (make) in
            make.width.height.equalTo(38)
            make.top.left.equalToSuperview().offset(15)
        }
        
        self.contentView.addSubview(maks_image_view)
        maks_image_view.snp.makeConstraints { (make) in
            make.top.equalTo(icon)
            make.left.equalTo(icon.snp.right).offset(10)
        }
        
    }
    
    
    override var message: ST_DTChatMessage!{
        didSet{
            
            icon.sd_setImage(with: message.portraitUri.compress_image().url,for: UIControl.State.normal, completed: nil)
            
            print("bug 2926:",message.portraitUri)
            
            self.uuid = message.uuid
        }
    }
            
            
            
    
    
    
    
    
}
